export default {
    namespaced: true,
    state: {
        goodsObj: {
            did: 0,
            type: 0,
            min: 0,
            max: 10000,
            keyword: "",
        },
    },
    mutations: {
        changeGoodsObj(state, payload) {
            let arr = Object.keys(payload)
            arr.forEach(item => {
                if (state.goodsObj.hasOwnProperty(item)) {
                    state.goodsObj[item] = payload[item]
                }
            })
        }
    }
}